﻿using Microsoft.Owin.Hosting;
using System;
using System.Collections.Generic;
using System.Net.Http;

namespace SelfHostWebApi
{
    class Program
    {
        static void Main(string[] args)
        {
            string baseAddress = "http://localhost:9000/";

            // Start OWIN host 
            using (WebApp.Start<Startup>(url: baseAddress))
            {

                // Create HttpCient and make a request to api/values 
                HttpClient client = new HttpClient();
                Console.WriteLine("服务已经运行。输入“exit”，退出服务！");
                while (true)
                {
                    string exit = Console.ReadLine();
                    if (exit == "exit")
                    {
                        return;
                    }
                    Console.WriteLine("输入错误，请从新输入！");
                }

            }
        }
    }
}
